package com.niiwoo.civet.mobile.vo.response.myloan;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 借款标的详情页
 * @author liaojunjun
 *
 */
@Getter
@Setter
@ApiModel
public class ProjectBorrowDetailReponseVO {
	
	/**
	 * 标的状态(1:审核中;2:已流标;3:借款被退回;4:审核通过待确认;5:投资中;6:还款中;7:还款逾期;8:严重逾期;9:已结束;10:严重逾期已结算)
	 */
	@ApiModelProperty(value = "标的状态(1:审核中;2:已流标;3:借款被退回;4:审核通过待确认;5:投资中;6:还款中;7:还款逾期;8:严重逾期;9:已结束;10:严重逾期已结算)", required = true)
	private Byte disStatus;

	/**
	 * 子状态，（100审核中-初始，101审核中-借款退回，102自动审核-通过，103自动审核-人工审核，104人工审核-通过，105审核通过待确认（融360有）113您的借款已审核通过，等待发布中，200筹款中-初始，201筹款中-放款中,300还款中-正常还款中，301还款中-逾期还款中，302还款中-坏账还款中，400已结清-正常，401已结清-提前结清，402已结清-坏账结清，500流标-自动审核不通过，501流标-人工审核不通过，502流标-借款退回超时未确认，503流标-借款人手动取消，504流标-投资超时，505流标-后台管理人员手工流标）
	 */
	@ApiModelProperty(value = "子状态，（100审核中-初始，101审核中-借款退回，102自动审核-通过，103自动审核-人工审核，104人工审核-通过，105审核通过待确认（融360有）113您的借款已审核通过，等待发布中，200筹款中-初始，201筹款中-放款中,300还款中-正常还款中，301还款中-逾期还款中，302还款中-坏账还款中，400已结清-正常，401已结清-提前结清，402已结清-坏账结清，500流标-自动审核不通过，501流标-人工审核不通过，502流标-借款退回超时未确认，503流标-借款人手动取消，504流标-投资超时，505流标-后台管理人员手工流标）")
	private Integer subStatus;

	/**
	 * 借款用途审核状态(审核状态（1未审核，2通过，3不通过）)
	 */
	@ApiModelProperty(value = "借款用途审核状态(审核状态（1未审核，2通过，3不通过）)")
	private Byte loanVoucherAuditStatus;
	
	/**
	 * 昵称
	 */
	@ApiModelProperty(value = "昵称",  required = true)
	private String nickName;
	
	/**
	 * 头像地址
	 */
	@ApiModelProperty(value = "头像地址",  required = true)
	private String headImage;

	/**
	 * ID
	 */
	@ApiModelProperty(value = "标的ID",  required = true)
	private Long projectId;
	
	/**
	 * 标的标题
	 */
	@ApiModelProperty(value = "标的标题",  required = true)
	private String projectTitle;

	@ApiModelProperty(value = "产品类型--1:个人极速借 2:机构极速借 3:你我云贷 4:卡易借 8:小易贷 9:社保贷 10:信用卡贷")
	private Byte type;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间",  required = true)
	private String createTime;
	
	/**
	 * 审核中详情
	 */
	@ApiModelProperty(value = "审核中详情")
	private DetailChecking detailChecking;
	
	/**
	 * 已流标详情
	 */
	@ApiModelProperty(value = "已流标详情")
	private DetailMiscarry detailMiscarry;

	/**
	 * 借款被退回详情
	 */
	@ApiModelProperty(value = "借款被退回详情")
	private DetailBack detailBack;

	/**
	 * 借款被退回详情
	 */
	@ApiModelProperty(value = "借款被退回详情-新产品（小易贷，社保贷，信用卡贷）")
	private NewDetailBack newDetailBack;
	
	/**
	 * 审核通过待确认详情
	 */
	@ApiModelProperty(value = "审核通过待确认详情")
	private DetailToBeConfirmed detailToBeConfirmed;
	
	/**
	 * 投资中详情
	 */
	@ApiModelProperty(value = "投资中详情")
	private DetailCollecting detailCollecting;
	
	/**
	 * 还款中详情
	 */
	@ApiModelProperty(value = "还款中详情")
	private DetailRepaying detailRepaying;
	
	/**
	 * 还款逾期详情
	 */
	@ApiModelProperty(value = "还款逾期详情")
	private DetailOverdueRepaying detailOverdueRepaying;
	
	/**
	 * 严重逾期详情
	 */
	@ApiModelProperty(value = "严重逾期详情")
	private DetailBadDebt detailBadDebt;
	
	/**
	 * 已结束详情
	 */
	@ApiModelProperty(value = "已结束详情")
	private DetailFinish detailFinish;
	
	/**
	 * 严重逾期已结算详情
	 */
	@ApiModelProperty(value = "严重逾期已结算详情")
	private DetailBadDebtFinish detailBadDebtFinish;

	/**
	 * 是否显示提额认证
	 */
	@ApiModelProperty(value = "是否显示提额认证: false-不显示 true-显示")
	private Boolean showIncreaseLoanAmount;

	/**
	 * 审核中详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "审核中详情")
	public static class DetailChecking{
		
	}
	
	/**
	 * 已流标详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "已流标详情")
	public static class DetailMiscarry{
		/**
		 * 流标时间
		 */
		@ApiModelProperty(value = "流标时间",  required = true)
		private String miscarryTime;
		
		/**
		 * 流标描述
		 */
		@ApiModelProperty(value = "流标描述",  required = true)
		private String miscarryDisplay;
		
		/**
		 * 是否显示第三方渠道,只有借款人自己取消的标的不显示
		 */
		@ApiModelProperty(value = "是否显示第三方渠道,只有借款人自己取消的标的不显示",  required = true)
		private boolean showThirdChannel;
	}
	
	/**
	 * 借款被退回详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "借款被退回详情")
	public static class DetailBack{
		/**
		 * 退回原因
		 */
		@ApiModelProperty(value = "退回原因",  required = true)
		private List<String> reasonList;
		
		/**
		 * 用户处理方案 1修改授信资料、2修改借款资料
		 */
		@ApiModelProperty(value = "用户处理方案 1修改授信资料、2修改借款资料",  required = true)
		private Byte processScheme;

		@ApiModelProperty(value = "通知内容")
		private String noticeContent;
	}

	/**
	 * 借款被退回详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "借款被退回详情")
	public static class NewDetailBack{
		@ApiModelProperty(value = "产品类型(默认1:个人极速借 2:机构极速借 3:你我云贷 4:卡易借 8:小易贷 9:社保贷 10:信用卡贷)")
		private Byte type; //

		@ApiModelProperty(value = "借款期限")
		private Integer loanTerm;   //借款期限

		@ApiModelProperty(value = "到手金额")
		private BigDecimal handAmount;

		@ApiModelProperty(value = "借款用途")
		private String loanUsage;

		/**
		 * 退回原因
		 */
		@ApiModelProperty(value = "退回原因")
		private List<String> reasonList;

		@ApiModelProperty(value = "通知内容")
		private String noticeContent;
	}
	
	/**
	 * 审核通过待确认详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "审核通过待确认详情")
	public static class DetailToBeConfirmed{

		/**
		 * 借款标题-借款用途
		 */
		@ApiModelProperty(value = "借款标题-借款用途",  required = true)
		private String title;

		/**
		 * 合同金额
		 */
		@ApiModelProperty(value = "合同金额",  required = true)
		private BigDecimal contractAmount;
		
		/**
		 * 到手金额
		 */
		@ApiModelProperty(value = "到手金额",  required = true)
		private BigDecimal handAmount;
		
		/**
		 * 前期服务费
		 */
		@ApiModelProperty(value = "前期服务费",  required = true)
		private BigDecimal prophaseServiceFee;
		
		/**
		 * 平台管理费
		 */
		@ApiModelProperty(value = "平台服务费",  required = true)
		private BigDecimal platformServiceFee;
		
		/**
		 * 担保服务费
		 */
		@ApiModelProperty(value = "担保服务费",  required = true)
		private BigDecimal guaranteeFee;
		
		/**
		 * 借款利率
		 */
		@ApiModelProperty(value = "借款利率",  required = true)
		private BigDecimal borrowRate;
		
		/**
		 * 期数
		 */
		@ApiModelProperty(value = "期数",  required = true)
		private Integer deadline;
		
		/**
		 * 期数单位
		 */
		@ApiModelProperty(value = "期数单位(1:月，2:天)",  required = true)
		private Byte deadlineUnit;
		
		/**
		 * 还款方式
		 */
		@ApiModelProperty(value = "还款方式（1到期还本息，2等额本息，3按月还息，到期还本）",  required = true)
		private Byte repaymentType;
		
		/**
		 * 投放渠道CODE(app为默认渠道   kaolalicai考拉理财  tuandai团贷)
		 */
		@ApiModelProperty(value = "投放渠道CODE(app为默认渠道   kaolalicai考拉理财  tuandai团贷)",  required = true)
		private String channelCode;
		
		/**
		 * 标的来源（1、APP，2、H5活动，3、H5极速借, 4、融360）
		 */
		@ApiModelProperty(value = "标的来源（1、APP，2、H5活动，3、H5极速借, 4、融360）",  required = true)
		private Byte fromSource;
		
		/**
		 * 类型(默认1:个人极速借 2:机构极速借 3:你我云贷)
		 */
		@ApiModelProperty(value = "类型(默认1:个人极速借 2:机构极速借 3:你我云贷)",  required = true)
		private Byte bizType;
		
		/**
		 * 每月还款
		 */
		@ApiModelProperty(value = "每月还款",  required = true)
		private BigDecimal monthRefundAmount;
		
		/**
		 * 还款总额
		 */
		@ApiModelProperty(value = "还款总额",  required = true)
		private BigDecimal refundTotalAmount;
		
		/**
		 * 平台管理费
		 */
		@ApiModelProperty(value = "平台管理费",  required = true)
		private BigDecimal managementFee;
		
		/**
		 * 利息
		 */
		@ApiModelProperty(value = "利息",  required = true)
		private BigDecimal interest;
		
		/**
		 * 确认截止时间
		 */
		@ApiModelProperty(value = "确认截止时间",  required = true)
		private String confirmEndTime;
		
		/**
		 * 申请是否有调整
		 */
		@ApiModelProperty(value = "申请是否调整")
		private boolean applyIsChange;

		/**
		 * 调整前申请金额
		 */
		@ApiModelProperty(value = "调整前申请金额")
		private BigDecimal applyAmount;

		/**
		 * 调整前申请期限
		 */
		@ApiModelProperty(value = "调整前申请期限")
		private String applyDeadline;

		@ApiModelProperty(value = "通知内容，如：请您在XXXX年XX月XX日24:00前确认，过期借款申请将失效哦。")
		private String noticeContent;

		@ApiModelProperty(value = "借款利率")
		private BigDecimal borrowInterestRate;

		@ApiModelProperty(value = "担保服务费率")
		private BigDecimal guaranteeServiceFeeRate;

		@ApiModelProperty(value = "平台管理费率")
		private BigDecimal platformManageFeeRate;

		@ApiModelProperty(value = "逾期罚息")
		private BigDecimal overDueFee;
	}
	
	/**
	 * 投资中详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "投资中详情")
	static public class DetailCollecting{
		/**
		 * 发布时间
		 */
		@ApiModelProperty(value = "发布时间",  required = true)
		private String publishTime;
		
		/**
		 * 已投资金额
		 */
		@ApiModelProperty(value = "已投资金额",  required = true)
		private BigDecimal investAmount;
		
		/**
		 * 借款目标
		 */
		@ApiModelProperty(value = "借款目标",  required = true)
		private BigDecimal contractAmount;
		
		/**
		 * 投资进度
		 */
		@ApiModelProperty(value = "投资进度",  required = true)
		private BigDecimal investRateOfProgress;
		
		/**
		 * 投标剩余时间
		 */
		@ApiModelProperty(value = "投标剩余时间",  required = true)
		private String investEndTime;
	}
	
	/**
	 * 还款中详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "还款中详情")
	public static class DetailRepaying{
		/**
		 * 满标时间
		 */
		@ApiModelProperty(value = "满标时间",  required = true)
		private String fullSuccessTime;
		
		/**
		 * 合同金额
		 */
		@ApiModelProperty(value = "合同金额",  required = true)
		private BigDecimal contractAmount;
		
		/**
		 * 借款利率
		 */
		@ApiModelProperty(value = "借款利率",  required = true)
		private BigDecimal borrowRate;
		
		/**
		 * 期数
		 */
		@ApiModelProperty(value = "期数",  required = true)
		private Integer deadline;
		
		/**
		 * 期数单位
		 */
		@ApiModelProperty(value = "期数单位",  required = true)
		private Byte deadlineUnit;
		
		/**
		 * 发布时间
		 */
		@ApiModelProperty(value = "发布时间",  required = true)
		private String publishTime;

		/**
		 * 银行卡后几位
		 */
		@ApiModelProperty(value = "银行卡后几位",  required = true)
		private String bankAccountNoendNum;
		
		/**
		 * 投放渠道CODE
		 */
		@ApiModelProperty(value = "投放渠道CODE",  required = true)
		private String channelCode;
		
		/**
		 * 标的来源（1、APP，2、H5活动，3、H5极速借, 4、融360）
		 */
		@ApiModelProperty(value = "标的来源（1、APP，2、H5活动，3、H5极速借, 4、融360）",  required = true)
		private Byte fromSource;
		
		/**
		 * 类型(默认1:个人极速借 2:机构极速借 3:你我云贷)
		 */
		@ApiModelProperty(value = "类型(默认1:个人极速借 2:机构极速借 3:你我云贷)",  required = true)
		private Byte bizType;
		
		/**
		 * 当期还款状态（1未还款，2已正常还款，3已逾期还款）
		 */
		@ApiModelProperty(value = "当期还款状态（1未还款，2已正常还款，3已逾期还款）",  required = true)
		private Byte currentRefundStatus;
		
		/**
		 * 当期应还总金额
		 */
		@ApiModelProperty(value = "当期应还总金额",  required = true)
		private BigDecimal currentPeriodRefundTotalAmount;
		
		/**
		 * 当期期数
		 */
		@ApiModelProperty(value = "当期期数",  required = true)
		private Integer currentPeriod;
		
		/**
		 * 总期数
		 */
		@ApiModelProperty(value = "总期数",  required = true)
		private Integer totalPeriod;
		
		/**
		 * 当期应还本金
		 */
		@ApiModelProperty(value = "当期应还本金",  required = true)
		private BigDecimal currentPeriodCapital;
		
		/**
		 * 当期应还利息
		 */
		@ApiModelProperty(value = "当期应还利息",  required = true)
		private BigDecimal currentPeriodInterest;
		
		/**
		 * 当期应还平台管理费
		 */
		@ApiModelProperty(value = "当期应还平台管理费",  required = true)
		private BigDecimal currentPeriodManagementFee;
		
		/**
		 * 当期应还担保服务费
		 */
		@ApiModelProperty(value = "当期应还担保服务费",  required = true)
		private BigDecimal currentPeriodGuaranteeFee;
		
		/**
		 * 待还总金额
		 */
		@ApiModelProperty(value = "待还总金额",  required = true)
		private BigDecimal pendingRepaymentTotalAmount;
		
		/**
		 * 待还本金总额
		 */
		@ApiModelProperty(value = "待还本金总额",  required = true)
		private BigDecimal pendingRepaymentCapitalTotal;
		
		/**
		 * 待还应还利息总额
		 */
		@ApiModelProperty(value = "待还应还利息总额",  required = true)
		private BigDecimal pendingRepaymentInterestTotal;
		
		/**
		 * 待还平台管理费总额
		 */
		@ApiModelProperty(value = "待还平台管理费总额",  required = true)
		private BigDecimal pendingRepaymentManagementFeeTotal;
		
		/**
		 * 待还担保服务费总额
		 */
		@ApiModelProperty(value = "待还担保服务费总额",  required = true)
		private BigDecimal pendingRepaymentGuaranteeFeeTotal;
		
		/**
		 * 当天是否还款日
		 */
		@ApiModelProperty(value = "当天是否还款日",  required = true)
		private Boolean repayDateIsToday; 
		
		/**
		 * 当期还款日
		 */
		@ApiModelProperty(value = "当期还款日",  required = true)
		private Date currentPeriodRefundDate;
		
		/**
		 * 考拉还款状态
		 */
		@ApiModelProperty(value = "考拉还款状态",  required = true)
		private Byte kaolaRepayStatus;
	}
	
	/**
	 * 还款逾期详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "还款逾期详情")
	public static class DetailOverdueRepaying extends DetailRepaying{
		/**
		 * 逾期天数
		 */
		@ApiModelProperty(value = "逾期天数",  required = true)
		private Integer overdueDay;
		
		/**
		 * 罚息日利率
		 */
		@ApiModelProperty(value = "罚息日利率",  required = true)
		private BigDecimal penaltyRate;
		
		/**
		 * 逾期期数
		 */
		@ApiModelProperty(value = "逾期期数",  required = true)
		private Integer overduePeriod;
		
		/**
		 * 罚息
		 */
		@ApiModelProperty(value = "罚息",  required = true)
		private BigDecimal penaltyFee;
	}
	
	/**
	 * 严重逾期详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "严重逾期详情")
	public static class DetailBadDebt extends DetailOverdueRepaying{
		/**
		 * 终止日期
		 */
		@ApiModelProperty(value = "终止日期",  required = true)
		private String endTime;
	}
	
	/**
	 * 已结束详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "已结束详情")
	public static class DetailFinish{
		
	}
	
	/**
	 * 严重逾期已结算详情
	 */
	@Getter
	@Setter
	@ApiModel
	@Api(tags = "严重逾期已结算详情")
	public static class DetailBadDebtFinish{
		
	}
}
